import React, { memo } from 'react'
import { useHistory } from 'react-router'
import sty from './sty.module.css'



const NavBar = (props) => {
    const history = useHistory()
    const goBack = () => {
        history.goBack()
    }

    return (
        <div className={sty.nav}>
            <div className={`iconfont icon-zuojiantou ${sty.back}`} onClick={goBack} />

            <div className={sty.center}>{props.children}</div>
        </div>
    )

}

export default memo(NavBar)